<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>主页面</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="layui/css/layui.css" media="all">
    <style>
        .layui-main-bg {
            position: fixed;
            width: 100%;
            height: 100%;
            background: url(/images/main_background.jpeg) 50% 50% / cover;
            opacity: 0.3;
        }
    </style>
</head>

<body>
<div class="layui-main-bg"></div>
<!--头部信息-->
<div class="layui-fluid layui-bg-cyan" style="height: 50px;line-height: 50px;">
    <div class="layui-row">
        <div class="layui-col-md12" style="text-align: right;">
            你好！欢迎访问办公管理系统！|
            <a href="#" style="color: orangered;" id="loginOut">退出</a>
        </div>
    </div>
</div>
<!--左侧导航栏-->

<div class="layui-fluid layui-bg-gray">
    <div class="layui-col-md2 layui-side-scroll">
        <ul class="layui-nav layui-nav-tree layui-bg-cyan" id="menu-list">
            <li class="layui-nav-item">
                <a href="javascript:void(0);" data-link="personal-show.html">个人信息</a>
            </li>
            <li class="layui-nav-item">

                <a class="" href="javascript:void(0);" data-link="update-password.html">邮件管理</a>

                <dl class="layui-nav-child">
                    <dd>
                        <a href="javascript:void(0);" data-link="sendMail.html">写邮件</a>
                    </dd>
                    <dd>
                        <a href="javascript:void(0);" data-link="inbox.html">收件箱</a>
                    </dd>
                    <dd>
                        <a href="javascript:void(0);" data-link="spam.html">垃圾邮件</a>
                    </dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:void(0);">考勤管理</a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:void(0);" data-link="vacation.html">休假</a></dd>
                </dl>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:void(0);" data-link="hitCard.html">打卡</a></dd>
                </dl>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:void(0);" data-link="hitCard-record.html">打卡记录</a></dd>
                </dl>
            </li>

        </ul>
    </div>
    <div class="layui-col-md8" id="content" style="padding-top: 50px" ></div>
</div>

<script type="text/javascript" src="js/jquery1.9.1.js"></script>
<script type="text/javascript" src="js/vue.js"></script>
<script type="text/javascript" src="layui/layui.js"></script>
<script type="text/javascript" src="js/axios.min.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script>
    layui.use("element", function () {
        //左侧菜单栏的点击事件
        $(document).on("click","#menu-list>li", function (e) {
            var $target = $(e.target);
            axios.get($target.attr("data-link")).then(function (res) {
                $("#content").html(res.data);
            });
        });
    });
</script>


</body>

</html>
